package com.koron.tool.controller;

import com.koron.bean.base.Response;
import com.koron.bean.system.staff.vo.EamUser;
import com.koron.common.core.annocation.CasUser;
import com.koron.tool.service.ToolWarningInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.koron.ebs.mybatis.ADOConnection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @Author: laiguangming
 * @Date: 2022/10/24 16:29
 */
@Slf4j
@Api(tags = "工器具预警管理")
@RestController
@RequestMapping("/warningInfo")
public class ToolWarningInfoController {

    @Autowired
    private ToolWarningInfoService service;

    @ApiOperation(value = "获取预警信息列表")
    @GetMapping("/getWarningInfoList")
    public Response getWarningInfoList(@CasUser @ApiIgnore EamUser user) {
        return ADOConnection.runTask(user.getCurrDs(), service, "getWarningInfoList", Response.class);
    }

}
